package gui.jmenubar.jmenu;

import java.awt.event.MouseEvent;

import javax.swing.JMenuItem;

import camaras.Camara;

public class JMenuCamara extends JMenuApp{

	private static final long serialVersionUID = 1L;
	
	public JMenuCamara(){
		initComponents();
	}

	private void initComponents() {
		setText("Camara");
		
		JMenuItem jMenuItem = new JMenuItem();
		jMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
				java.awt.event.KeyEvent.VK_D,
				java.awt.event.InputEvent.CTRL_MASK));
		jMenuItem.setText("3D");
		jMenuItem.addMouseListener(new java.awt.event.MouseAdapter() {
			public void mousePressed(java.awt.event.MouseEvent evt) {
				jMenuItem3DMouseClicked(evt);
			}

			private void jMenuItem3DMouseClicked(MouseEvent evt) {
				jTab.setPosicionCamara(Camara.ESQUINA);
				
			}
		});
		add(jMenuItem);

		jMenuItem = new JMenuItem();
		jMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
				java.awt.event.KeyEvent.VK_F,
				java.awt.event.InputEvent.CTRL_MASK));
		jMenuItem.setText("Frontal");
		jMenuItem.addMouseListener(new java.awt.event.MouseAdapter() {
			public void mousePressed(java.awt.event.MouseEvent evt) {
				jMenuItemFrontalMouseClicked(evt);
			}

			private void jMenuItemFrontalMouseClicked(MouseEvent evt) {
				jTab.setPosicionCamara(Camara.FRONTAL);
			}
		});
		add(jMenuItem);

		jMenuItem = new JMenuItem();
		jMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
				java.awt.event.KeyEvent.VK_L,
				java.awt.event.InputEvent.CTRL_MASK));
		jMenuItem.setText("Lateral");
		jMenuItem.addMouseListener(new java.awt.event.MouseAdapter() {
			public void mousePressed(java.awt.event.MouseEvent evt) {
				jMenuItemLateralMouseClicked(evt);
			}

			private void jMenuItemLateralMouseClicked(MouseEvent evt) {
				jTab.setPosicionCamara(Camara.LATERAL);				
			}
		});
		add(jMenuItem);

		jMenuItem = new JMenuItem();
		jMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
				java.awt.event.KeyEvent.VK_C,
				java.awt.event.InputEvent.CTRL_MASK));
		jMenuItem.setText("Cenital");
		jMenuItem
				.addMouseListener(new java.awt.event.MouseAdapter() {
					public void mousePressed(java.awt.event.MouseEvent evt) {
						jMenuItemCenitalMouseClicked(evt);
					}

					private void jMenuItemCenitalMouseClicked(MouseEvent evt) {
						jTab.setPosicionCamara(Camara.CENITAL);
					}
				});
		add(jMenuItem);
	}

}
